home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / rexx / sendmessage.clrexx < prev    next >
Encoding:
Text File  |  1995-11-26  |  1.6 KB  |  77 lines

  1. /*
  2. **  $VER: SendMessage.clrexx 1.11 (16 Nov 1995)
  3. **
  4. **        © 1995 Ralf Ramge
  5. **
  6. **  PROGRAMNAME:
  7. **      SendMessage.clrexx
  8. **
  9. **  FUNCTION:
  10. **
  11. **      Demostrationsskript für Connectline 5.0
  12. **
  13. **      Connectline © 1986-1995 Oliver Wagner, Mathias Mischler
  14. **
  15. **      Schickt eine Nachricht an einen Port.
  16. **
  17. **  $HISTORY:
  18. **
  19. **      1.0 - Release-Version
  20. **      1.1 - Window fontsensitiv
  21. **      1.11- Window um 100% verbreitert, damit erst späterer Zei-
  22. **            lenumbruch bei der Eingabe.
  23. **
  24. */
  25.  
  26. /* rexxsupport.library öffnen */
  27.  
  28. if ~show('L','rexxsupport.library') then do
  29.     if ~addlib('rexxsupport.library',0,-30,0) then do
  30.         say 'rexxsupport.library konnte nicht geöffnet werden!'
  31.         say 'Bitte kopieren Sie die Library von ihren Workbench-'
  32.         say 'disketten nach LIBS:.'
  33.         exit 10
  34.         end
  35.     end
  36.  
  37. /* Fontsize ermitteln */
  38.  
  39. gfxbase=showlist(l,'graphics.library',0,a)
  40. call forbid
  41. FontAddress=next(gfxbase,154)
  42. Fontsize=c2d(IMPORT(offset(FontAddress,20),2))
  43. call permit
  44. windowwidth=Fontsize*80
  45. windowheight=Fontsize*15
  46. windowY=Fontsize+1
  47. WindowX=Fontsize
  48.  
  49.  
  50.  
  51. /* Standard-IO umleiten */
  52.  
  53. call close STDOUT
  54. if ~open(STDOUT,'CON:'windowX'/'windowY'/'windowwidth'/'windowheight'/SendMessage','W') then
  55.     exit 20
  56. else do
  57.     call close STDIN
  58.     call open STDIN,'*',R
  59.     call pragma '*'
  60.     end
  61.  
  62. /* Eingabe */
  63.  
  64. options prompt "Nachricht an welchen Port :"
  65. pull port
  66. options prompt "Bitte Nachricht eingeben  :"
  67. pull message
  68. address 'CL-SERVER'
  69. 'MESSAGE 'port' 'message
  70. say ''
  71. say 'Nachricht wurde verschickt.'
  72. options prompt "<Bitte drücken Sie RETURN>"
  73. pull dummy
  74. call close STDOUT
  75. call close STDIN
  76. exit
  77.